<?php
if (isset($_COOKIE['check'])) {
	$is_log = "0";
	include 'setting.php';
	$con = mysqli_connect($sqldatabase, $sqlusername, $sqlpassword,$sqltable);
	mysqli_query($con,'set names utf8'); 
	$result = mysqli_query($con,"SELECT * FROM userdata where checkcode='" . $_COOKIE['check'] . "'");
	$is_logp = false;
	while ($row = mysqli_fetch_array($result)) {
		$is_logp = true;
	}
	mysqli_close($con);
	if ($is_logp) {
		$is_log = "0";
	} else {
		$is_log = "1";
	}
} else {
	$is_log = "1";
}
?>